package com.meshnetics.gb.stack.core.layer;

/**
 * Interface for generating unique IDs.
 *
 * @author mmarkov
 */
public interface IDGenerator {
    /**
     * Returns next not-used ID.
     *
     * @return next not-used ID 
     */
    int generateID();

    /**
     * Frees the given id for the next use.
     *
     * @param id ID to be marked as not-used
     */
    void freeID(int id);
}
